Skip to content

Conversation

@bashtanov
Copy link

Currently, due to a chain of omnivorous templated functions and constructor calls, co_return is much more lax with types than plain return. In particular, co_return can implicitly call explicit constructors, which is counter-intuitive.

We have seen bugs because of it. They include silent casting of enums such as raft::errc to cluster::errc just by index. Or strong types such as model::offset and kafka::offset cast one to another and/or to the underlying type.

This change is to avoid it. I understand it should be discussed with Seastar devs, PRing it here to gather internal opinions first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant